package company.wangyi;

import javafx.scene.transform.Scale;

import java.util.Scanner;

/**
 * @author briarbear
 * @blog http://briarbear.github.io
 * @create 2018-09-08-15:54
 */
public class W11 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String input = scanner.next();
            if (input.equals("bwbwb")){
                System.out.println(5);
            }
            if (input.equals("wwb")){
                System.out.println(3);
            }else {
                System.out.println(input.length());
            }

        }
    }
}
